package com.yumeng.webapp.shiro.config;

import com.yumeng.framework.core.config.WebMvcConfiguration;
import com.yumeng.framework.core.mvc.filter.TestFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * WebMvc配置
 *
 * @author wxd
 * @date 2025/9/19 20:18
 */
@Configuration
public class WebMvcConfig extends WebMvcConfiguration {

    /**
     * 测试Filter
     *
     * @return
     */
    //@Bean
    public FilterRegistrationBean<TestFilter> registerTestFilter(){
        FilterRegistrationBean<TestFilter> registration = new FilterRegistrationBean<>();
        registration.setFilter(new TestFilter());
        registration.addUrlPatterns("/*");
        registration.setName("ShiroTestFilter");
        registration.setOrder(1);
        return registration;
    }

}
